<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<%@ taglib prefix="his_fns" uri="/WEB-INF/tlds/his_fns.tld" %>
<meta name="decorator" content="default"/>

<script>


    /*选中行*/
    var ctx = '${ctx}';
    var applyId = "";
    var itemClass = "";
    function applyClicks(tr,obj, tb, inoroutFlag) {
        $(tr).each(function(i,e){
            $(this).parent().find("tr").removeClass("table-selected");
            $(this).addClass("table-selected");
//            }
        })
        applyId = obj;
        $("#applyId").val(applyId);
        var item = $(tb).find("td").eq(3).text();
        if (item == '草药') {
            itemClass = 'B';
            funItem(itemClass, inoroutFlag);
        } else {
            itemClass = 'A';
            funItem(itemClass, inoroutFlag);
        }
    }
    //西药/草药单选按钮事件
    function funItem(obj, inoroutFlag) {
        itemClass = obj;
        if (itemClass == 'B') {
            $("#centrePerscription").show();
            $("#westPerscription").hide();
            loadDiv('prescChineseItemDiv', ctx + '/doctor/prescriptionItem/chineseIndexSelect?applyId=' + applyId + '&inoroutFlag=' + inoroutFlag);
        } else {
            $("#centrePerscription").hide();
            $("#westPerscription").show();
//            $("#hospitalRegistrRight").load(ctx + '/doctor/prescriptionItem/listSelect?applyId=' + applyId+'&inoroutFlag='+inoroutFlag);
            loadDiv('hospitalRegistrRight', ctx + '/doctor/prescriptionItem/listSelect?applyId=' + applyId + '&inoroutFlag=' + inoroutFlag);
        }

//        $("#itemClass").val(itemClass);

    }
</script>
<div class="content-wrap">
    <div class="wrapper" style="bottom: 50px;">
        <section class="panel panel-default">
            <div class="panel-body">
                <div class="col-lg-6 right-border" id="hospitalRegistrLeft" style="min-height: 300px;">
                    <jsp:include page="prescSelectHistory.jsp"></jsp:include>
                </div>
                <div class="col-lg-6" id="hospitalRegistrRight">
                    <jsp:include page="prescSelectHistoryTop.jsp"></jsp:include>
                </div>
                <div id="centrePerscription" style="display: none">
                    <div class="col-lg-12">
                        <section class="panel" id="prescChineseItemDiv">
                        </section>
                    </div>
                </div>
            </div>
        </section>
    </div>
</div>

<%--<script src="${ctxStatic}/js/doctor/prescriptionIndex.js"></script>--%>